#include<iostream>
using namespace std;
class Order{
public:
    void InsertSort(int *arr, int len)
    {
        int j, key;
        for (int i = 1; i < len; i++)
        {
            key = arr[i];
            j = i - 1;
            while (j >= 0 && arr[j] > key)
            {
                arr[j + 1] = arr[j];
                j--;
            }
            arr[j + 1] = key;
        }
    }
};
int main(){
    int arr[] = { 7, 8, 9, 5, 2, 0, 12, 6 };
    int len = sizeof arr / sizeof(arr[0]);
    Order o;
    o.InsertSort(arr,len);
    for (int j = 0; j < len; j++)
    {
    cout << arr[j] << " ";
    }
    cout << endl;
    return 0;
}
